package com.zdb.order.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

import java.util.Date;

/**
 * @Author Lx
 * @Date 2020/9/12 18:47
 * @Version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Setter
@Getter
@TableName("zdb_pms_order_detail")
public class OrderDetail {                  //订单详情
    @TableId("detail_id")
    private String detailId;                //订单详情id
    @TableField("order_id")
    private String orderId;                 //订单id
    @TableField("product_id")
    private String productId;               //商品id
    @TableField("product_name")
    private String productName;             //商品名称
    @TableField("product_price")
    private long productPrice;              //商品价格
    @TableField("product_quantity")
    private int productQuantity;            //商品数量
    @TableField("product_icon")
    private String productIcon;             //商品图片
    @TableField("create_time")
    private Date createTime;                //商品创建时间
    @TableField("update_time")
    private Date updateTime;                //商品更新时间

    @TableField(exist = false)
    private Double proTotalPrice;                  //此单，此类商品总价

    @Override
    public String toString() {
        return "OrderDetail{" +
                "detailId='" + detailId + '\'' +
                ", orderId='" + orderId + '\'' +
                ", productId='" + productId + '\'' +
                ", productName='" + productName + '\'' +
                ", productPrice=" + productPrice +
                ", productQuantity=" + productQuantity +
                ", productIcon='" + productIcon + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", proTotalPrice=" + proTotalPrice +
                '}';
    }

    public String getDetailId() {
        return detailId;
    }

    public void setDetailId(String detailId) {
        this.detailId = detailId;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public long getProductPrice() {
        return productPrice;
    }

    public void setProductPrice(long productPrice) {
        this.productPrice = productPrice;
    }

    public int getProductQuantity() {
        return productQuantity;
    }

    public void setProductQuantity(int productQuantity) {
        this.productQuantity = productQuantity;
    }

    public String getProductIcon() {
        return productIcon;
    }

    public void setProductIcon(String productIcon) {
        this.productIcon = productIcon;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Double getProTotalPrice() {
        return proTotalPrice;
    }

    public void setProTotalPrice(Double proTotalPrice) {
        this.proTotalPrice = proTotalPrice;
    }
}
